<h1> Rechnungen </h1>
<table>
  <tr>
    <th>Rechnungsnummer</th>
    <th>Firmenname</th>
	<th></th>
	<th></th>
	<% @invoices.each do |i| %>
	<% @customer = i.customer%>
	
  <tr>
    <td><%= i.invoicenr %></td>
    <td><%= @customer.companyname %></td>
   	<td> <%= link_to 'Details/ Neue Position', i %> 
  </tr>
<% end %>
</table>
<br/>
<br/>
<%= link_to 'Zurueck', home_index_path() %>
<%= link_to 'Neue Rechnung', new_invoice_path %>  
